var baseUrl = 'http://47.108.197.28';
function http(url){
    return new Promise((resolve,reject)=>{
        wx.request({
            url:baseUrl+url,
            data:{},
            header: {'content-type':'application/json'},
            method: 'GET',
            dataType: 'json',
            responseType: 'text',
            success: (res)=>{
                resolve(res)
            },
            fail: (err)=>{
                reject(err)
            }
        });
    })
}
function getMusicHttp(limit){
    console.log(limit)
    
    // return http(`:3000/dj/program/toplist?limit=${limit}`)
    return http(`:3000/top/album?limit=${limit}`)
}
module.exports={
    getMusicHttp
}